<?

	include_once "passwords.php";
	
function test()
{
	
}

function getConnection()
{
	global $dbPassword;
	$conn = new MySQLi('localhost', 'N02312117',$dbPassword, 'N02312117_db');
	return $conn;
}
function getUsers()
{
	$conn = getConnection();
	$result = $conn->query('SELECT * FROM 2011_Users');
	$conn->close();
	return $result;
}
	
function getUser($id)
{	
	$conn = getConnection();
	$result = $conn->query("SELECT * FROM 2011_Users WHERE id=$id");
	$rs = $result->fetch_assoc();
	$conn->close();
	return rs;
}
?>